package com.vogue.supplymall.match.domain.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.vogue.ssm.database.util.DealStatus;
import com.vogue.supplymall.match.domain.dao.PrepayDao;
import com.vogue.supplymall.match.domain.mapper.PrepayMapper;

@Repository("prepayDao")
public class PrepayDaoImpl extends BaseDaoImpl<Object, Long> implements PrepayDao{
	@SuppressWarnings("unused")
	@Autowired
	private PrepayMapper pripayMapper;
	
	@Override
	public  List<Map<String, Object>> getShopOfCustomer(String syscodeIds) {
		String sql="select distinct mo.id detail_supplyId,mo.matchid detail_matchId,min(mo.tendid) tendid,"
				+ " mo.orgname detail_name,mo.syscodeid"
				+ " from match_organ mo,rel_user_organ ruo "
				+ " where mo.id=ruo.organid and mo.syscodeid=ruo.syscodeid and mo.type in (2,3) and mo.syscodeid in ("+syscodeIds+")"
				+ " group by mo.matchid";
		DealStatus.kacha();
		return this.query(sql);
	}

	
}
